/**
 * Copyright (C) 2025 pony working team
 * SPDX-License-Identifier: MulanPSL-2.0
 */

/* includes (local) ----------------------------------------------------------*/
#include <drv_key.h>
/* includes (standard library, system) ---------------------------------------*/
#include <stdio.h>
/* includes (other library) --------------------------------------------------*/
/* includes (project) --------------------------------------------------------*/
#include <x_module.h>

/* defines -------------------------------------------------------------------*/
/* typedefs ------------------------------------------------------------------*/
/* macro ---------------------------------------------------------------------*/
/* variables (extern) --------------------------------------------------------*/
/* variables (local) ---------------------------------------------------------*/
/* variables (global) --------------------------------------------------------*/
/* inlines -------------------------------------------------------------------*/
/* functions -----------------------------------------------------------------*/

static int __key_event_handler(uint8_t id, uint8_t event)
{
    printf("id=%d, event=%d\n", id, event);
    return 0;
}

static int __drv_key_init(void)
{
    hal_key_set_event_cb(__key_event_handler);

    return 0;
}

MODULE_INIT(postboard, __drv_key_init);
